package com.gxa.shop.commons.format;

/**
 * com.gxa.shop.bean.commons.format.NumberFormat
 * User: hly
 * Date: 2024/12/10 16:19
 * motto:   逆水行舟不进则退
 * Description:
 * Version: v1.0
 */
public class NumberFormat {

    public  static  Integer  stringToInteger(String str){
        try{
            return  Integer.parseInt(str);
        }catch (Exception  e){
            return  null;
        }
    }
    public  static  Double  stringToDouble(String str){
        try{
            return  Double.parseDouble(str);
        }catch (Exception  e){
            return  null;
        }
    }
    public  static  Long  stringToLong(String str){
        try{
            return  Long.parseLong(str);
        }catch (Exception  e){
            return  null;
        }
    }
}
